package virtPresenter.model
{
	/**
	 * This is a pure static class to manage all constants related to the scrubber
	 * and its components.
	 * */
	public class AS_Constants
	{
		
		/**
		 *Defines the border color of the scrubber. 
		 */	
		public static var BORDER_COLOR:uint=0xB7BABC;
		/**
		 *Defines the line color of the scrubber. 
		 */	
		public static var LINES_COLOR:uint=0xB7BABC;
		/**
		 *Defines the line color of the scrubber. 
		 */	
		public static var HISTORY_COLOR:uint=0xAAAAAA;
		/**
		 *Defines the color when mouse is off a track in the scrubber. 
		 */			
		public static var MOUSEOFFTRACK_COLOR:uint=0xFFFFFF;
		/**
		 *Defines the color when mouse is over a track in the scrubber. 
		 */	
		public static var MOUSEOVERTRACK_COLOR:uint=0xB2E1FF;
		/**
		 * Defines the color of the dragger.
		 */
		public static var DRAGGER_COLOR:uint=0x8888FF;
		/**
		 * Defines the color of the dragger, when mouse is over it. 
		 */
		public static var MOUSEOVERDRAGGER_COLOR:uint=0xFF8040;
		/**
		 * Defines the border color of the dragger. 
		 */
		public static var DRAGGER_BORDER_COLOR:uint=0x000000;
		/**
		 * Defines the size of the dragger. 
		 */
		public static var DRAGGER_SIZE:int= 6;
		/**
		 * Height of the scrubber
		 */
		public static var SCRUBBER_HEIGHT:int=26;
		
		/**
		 * Width of middle presentation holder
		 */
		public static var WIDTH_PREVIEW_MIDDLE:int=140;
		
		/**
		 * Width of left and right presentation holder
		 */
		public static var WIDTH_PREVIEW_SIDES:int=130;
		
		/**
		 * Width of Speedareas
		 */
		public static var WIDTH_SPEEDAREAS:int=86;
		
		/**
		 * Height of middle presentation holder
		 */
		public static var HEIGHT_PREVIEW_MIDDLE:int=100;
		
		/**
		 * Height of left and right presentation holder
		 */
		public static var HEIGHT_PREVIEW_SIDES:int=145;
		
		/**
		 * Height of the middle Fisheyes border
		 */
		public static var HEIGHT_FISHEYE_MIDDLE_BORDER:int = 126;
		
		/**
		 * Height of the middle Fisheyes border
		 */
		public static var HEIGHT_FISHEYE_SIDES_BORDER:int = 116;
		
		/**
		 * Is the distance between the middle slide preview window and the scrubber
		 */
		public static var DISTANCE_PREVIEW_MIDDLE_TO_SCRUBBER:int=40;
		
		/**
		 * Is the distance between the left / right slide preview window and the scrubber
		 */
		public static var DISTANCE_PREVIEW_SIDES_TO_SCRUBBER:int=45;
		
		/**
		 * Is the position of thumbSmall in the middle of the thumb
		 */
		public static var PARKING_POSITION_X_THUMB_SMALL:Number;
		
		/**
		 * Width of one mini preview image
		 */
		public static var WIDTH_MINI_PREVIEW:Number = 40;
		
		/**
		 * Height of one mini preview image
		 */
		public static var HEIGHT_MINI_PREVIEW:Number = 30;
		
		/**
		 * Distance between two mini preview images
		 */
		public static var DISTANCE_MINI_PREVIEW:Number = 2;
		
		/**
		 * Speedarea Bottom y-Position
		 */
		public static var SPEEDAREA_BOTTOM_Y:Number = 151;
		
		/**
		 * Speedarea Bottom width
		 */
		public static var SPEEDAREA_BOTTOM_WIDTH:Number = 85;
		
		/**
		 * Speedarea Bottom height
		 */
		public static var SPEEDAREA_BOTTOM_HEIGHT:Number = 35;
		/**
		 * Constructor can not be called.
		 * Since this class only provides static constants, this is not necessary.
		 * */
		
		public function AS_Constants()
		{
			throw new Error("This is a pure static class. No constructor call permitted.");
		}
		
		public static function getDistancesScrubberToPreviews(x:int, lv:Array):int{
			if (x>lv[2] && x<lv[3]){
				return DISTANCE_PREVIEW_MIDDLE_TO_SCRUBBER;
			} else if ((x>lv[3] && x<lv[1]) 
				|| (x<lv[2] && x>lv[0])){
				return DISTANCE_PREVIEW_SIDES_TO_SCRUBBER;
			} else if (x<lv[0] || x>lv[1]){
				return DISTANCE_PREVIEW_SIDES_TO_SCRUBBER;
			}
			return 0;
		}
		
		public static function getPreviewHeight(x:int, lv:Array):int{
			if (x>lv[2] && x<lv[3]){
				return HEIGHT_FISHEYE_MIDDLE_BORDER;
			} else if ((x>lv[3] && x<lv[1]) 
					|| (x<lv[2] && x>lv[0])){
				return HEIGHT_FISHEYE_SIDES_BORDER;
			}
			return 0;
		}
	}
}